package no.uio.ifi.cop.parse.option;

class BoolOption implements Option{

    String[] options;
    boolean set;

    BoolOption(String[] options){
        this.options = options;
        set = false;
    }

    public void clear(){
        set = false;
    }

    public boolean isSet(){
        return set;
    }

    public void set(){
        this.set = true;
    }

    public String toString(){

        StringBuilder sb = new StringBuilder();

        for(String s : options){
            sb.append(s + " ");
        }

        if ( this.isSet() ) {
            sb.append(": true ");
        }else{
            sb.append(": false");
        }

        return sb.toString();
    }

}
